// Get from db
// Store in easy to use format
include_once('assets/snippets/shoppingCart/kiwee.class.php');
$kiwee = new Kiwee();

if ($kiwee->config['cart_forcelogin'] == 'ENABLED'){	
   $ret= $kiwee->getCustomerInfo($_SESSION['webInternalKey']);
}
/*
$dbcompanyname = isset($ret['companyname']) ? $ret['companyname'] : ''; 
$dbfname = isset($ret['fname']) ? $ret['fname'] : '';
$dblname = isset($ret['lname']) ? $ret['lname'] : '';
$dbaddr1 = isset($ret['addr1']) ? $ret['addr1'] : '';
$dbaddr2 = isset($ret['addr2']) ? $ret['addr2'] : '';
$dbcity = isset($ret['city']) ? $ret['city'] : '';
$dbstate = isset($ret['state']) ? $ret['state'] : '';
$dbzip = isset($ret['zip']) ? $ret['zip'] : '';
$dbcountry = isset($ret['country']) ? $ret['country'] : '';
$dbphone = isset($ret['phone_1']) ? $ret['phone_1'] : '';
$dbext = isset($ret['ext_1']) ? $ret['ext_1'] : '';
$dbfax = isset(['fax']) ? $ret['fax'] : '';
$dbemail = isset($_SESSION['webEmail']) ? $_SESSION['webEmail'] : '';
*/

echo '<div id="CheckoutShippingFormDiv" style="width: 95%; ">';
echo '<div id="ShippingInfoTitle" style="margin-left: auto; margin-right: auto; width:610px; height: 25px; padding-top: 5px; padding-left: 10px; background-color: #497AFF; color: #FFF; font-size: 16px; font-weight: bold;">Shipping Information</div>';
echo '<div id="ShippingInfoDetail" style="margin-left: auto; margin-right: auto; width: 600px; height: 170px; padding: 10px; background-color: #E3E8E8;">';
echo '<table>';
echo '     <tr>';
echo '           <td>';
echo '<div id="shipcompanylabel" style="color: #54534C; font-size: 14px; font-weight: bold;">Company:</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipcompanyfield" style="padding-left: 25px;"><input tabindex="14" type="text" id="companyship" size="35" value="'. $dbcompanyname . '" /></div>';
echo '           </td>';

echo '     </tr>';
echo '</table>';
echo '<table>';
echo '     <tr>';
echo '           <td>';
echo '<div id="shipfnamelabel" style="color: #54534C; font-size: 14px; font-weight: bold;">First Name:*</div>';
echo '           </td>';
echo '           <td style="padding-left: 9px;" background-color: #ff9933;">';
echo '<div id="shipfnamefield" style=""><input tabindex="15" type="text" id="fnameship" value="'. $dbfname . '"/></div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shiplnamelabel" style="padding-left: 5px; color: #54534C; font-size: 14px; font-weight: bold;">Last Name:*</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shiplnamefield" style=""><input tabindex="16" type="text" id="lnameship" value="'. $dblname . '"/></div>';
echo '           </td>';
echo '     </tr>';
echo '</table>';
echo '<table>';
echo '     <tr>';
echo '           <td>';
echo '<div id="shipaddr1label" style="float:left;  color: #54534C; font-size: 14px; font-weight: bold;">Address:*</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipaddr1field" style="padding-left: 24px;"><input tabindex="17" type="text" id="addr1ship" size="41" value="'. $dbaddr1 . '"/></div>';
echo '           </td>';

echo '     </tr>';
echo '     <tr>';
echo '           <td>';
echo '<div id="shipaddr2label" style="color: #54534C; font-size: 14px; font-weight: bold;">Address 2:</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipaddr2field" style="padding-left: 24px;"><input tabindex="18" type="text" id="addr2ship" size="41" value="'. $dbaddr2 . '"/></div>';
echo '           </td>';
echo '     </tr>';
echo '</table>';
echo '<table>';
echo '     <tr>';
echo '           <td>';
echo '<div id="shipcitylabel" style="color: #54534C; font-size: 14px; font-weight: bold;">City:*</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipcityfield" style="padding-left: 40px; "><input tabindex="19" type="text" id="cityship" value="'. $dbcity . '"/></div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipstatelabel" style="padding-left: 40px; color: #54534C; font-size: 14px; font-weight: bold;">State:*</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipstatefield" style=""><input tabindex="20" type="text" size="5" id="stateship" value="'. $dbstate . '"/></div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipziplabel" style="padding-left: 15px; color: #54534C; font-size: 14px; font-weight: bold; ">Zip:*</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipzipfield" style=""><input tabindex="21" type="text" size="5" id="zipship" value="'. $dbzip . '"/></div>';
echo '           </td>';
echo '     </tr>';
echo '     <tr>';
echo '           <td>';
echo '<div id="shipphonelabel" style="color: #54534C; font-size: 14px; font-weight: bold;">Phone:*</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipphonefield" style="padding-left: 40px;"><input tabindex="22" type="text" id="phoneship" value="'. $dbphone . '"/></div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipextlabel" style="padding-left: 40px; color: #54534C; font-size: 14px; font-weight: bold;">Ext:</div>';
echo '           </td>';
echo '           <td>';
echo '<div id="shipextfield" style=""><input tabindex="23" type="text" size="5" id="extship" value="'. $dbext .'"></div>';
echo '           </td>';
echo '     </tr>';
echo '</table>';

echo '</div>';
echo '</div>';